Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(entry.server): provide nonce to react scripts #455

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

nicholaschiang
Copy link
Contributor

This patch provides the nonce option to the React renderToPipeableStream function so that React will add it to scripts dynamically injected (e.g. the <Suspense> inline scripts).

Ref: https://react.dev/reference/react-dom/server/renderToPipeableStream#parameters
Ref: facebook/react#26026 (comment)
Ref: remix-run/remix#5156 (comment)

Test Plan

Checklist

  • Tests updated
  • Docs updated

Screenshots

This patch provides the `nonce` option to the React
`renderToPipeableStream` function so that React will add it to scripts
dynamically injected (e.g. the `<Suspense>` inline scripts).

Ref: https://react.dev/reference/react-dom/server/renderToPipeableStream#parameters
Ref: facebook/react#26026 (comment)
Ref: remix-run/remix#5156 (comment)
@kentcdodds kentcdodds merged commit cdccc02 into epicweb-dev:main Sep 20, 2023
5 checks passed
@kentcdodds
Copy link
Member

Honestly not sure how I missed this 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants